package cn.distribution.receiptManager.entity.dao;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;
import org.springframework.format.annotation.DateTimeFormat;

import java.util.Date;

/**
 * receipt数据库
 * @author zhengminjie
 */
@Data
/**
 * 指定表名
 */
@TableName("data_receipt")
public class ReceiptDAO {
    /**
     * ID value与数据库主键列名一致
     */
    @TableId(value = "id", type = IdType.AUTO)
    private Long id;
    /**
     *   office_id
     */
    @TableField("office_id")
    private Long officeId;

    /**
     * 项目id project_id
     */
    @TableField("project_id")
    private Long projectId;

    /**
     * 收件人 receipt_id
     */
    @TableField("receipt_id")
    private Long receiptId;

    /**
     * 发件人 send_id
     */
    @TableField("send_id")
    private Long sendId;

    /**
     * 群id  group_id
     */
    @TableField("group_id")
    private Long groupId;

    /**
     * 私发还是群发（true-群发) if_public
     */
    @TableField("if_public")
    private Boolean ifPublic;

    /**
     * 数据内容 data_content
     */
    @TableField("data_content")
    private String dataContent;

    /**
     * 创建时间 createTime
     */
    @DateTimeFormat(pattern = "yyyyMMdd")
    @TableField("create_time")
    private Date createTime;

    /**
     * 状态(已读未读拒绝) state
     */
    @TableField("state")
    private String state;
}
